﻿<Page x:Class="SMS.Shell.Views.CargoListView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	Title="CargoListView">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <ToolBar Grid.Row="0">
            <Button Content="添加" Name="_btnCreate" Click="_btnCreate_Click" />
            <Button Content="修改" Name="_btnUpdate" Click="_btnUpdate_Click" />
            <Button Content="删除" Name="_btnDelete"/>
        </ToolBar>
        <DataGrid Name="_gridCargo" Grid.Row="1" AutoGenerateColumns="False" CanUserAddRows="False" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="名称" Binding="{Binding Caption}" Width="*"/>
                <DataGridTextColumn Header="条码" Binding="{Binding Code}" Width="*"/>
                <DataGridTextColumn Header="规格" Binding="{Binding Specifications}" Width="*"/>
                <DataGridTextColumn Header="单瓶价格" Binding="{Binding UnitPrice}" Width="*"/>
                <DataGridTextColumn Header="整箱价格" Binding="{Binding UnitPrice}" Width="*"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Page>
